package news.bll.user;

import java.util.List;

import news.dao.BaseDao;
import news.entity.User;

public class UserDaoImpl extends BaseDao implements UserDao {

	@Override
	public User getUser(String uname, String upwd) {
		String sql = "select uname,upwd from news_users where uname=? and upwd=?";
		List<User> users = this.executeQuery(sql, User.class, uname, upwd);
		User user = users.size() == 0 ? null : users.get(0);
		return user;
	}

}
